<?php
$or_no  = empty($payment) ? NULL : $payment->spr_or_no;
$amount = empty($payment) ? 0 : $payment->spr_ammt_paid;
$dop	= empty($payment) ? NULL : date('m/d/Y',strtotime($payment->spr_payment_date));
$remarks= empty($payment) ? NULL : $payment->spr_remarks;
//$mof    = empty($payment) ? NULL : $payment->spr_for_the_month_of;
$mde    = empty($payment) ? NULL : $payment->mode;
?>
<style>
	input#amount_money
	{
		padding:10px 20px;
		font-size:30px;
		font-family:DigitaldreamFatNarrowRegular;
		text-align:right;
		width:266px;
	}
	span#amount_money_span
	{
		position:absolute;
		font-size:30px;
		margin-top:12px;
		margin-left:12px;
	}
</style>
<div class="row">
	<div>
	<span class="label">Edit Payment Record</span>
	<hr class="clearfix">
	<? $this->load->view('layouts/student_profile_head');?>
	
	<span class="label">Current Payment Value</span>
	&#8369; <span style="color:#AB4705;font-size:20px;font-weight:bold;"><?=money($amount);?></span>
	<hr class="clearfix">
	<div>
		<div class="alert-box secondary">Payment Record Form</div>
		<?if(isset($system_message))echo $system_message;?>
		<? echo validation_errors();?>
		<?echo form_open('fees/edit_payment/'.$aut);?>
		<div class="row">			
			<div class="large-6 columns">
				<label>OR Number</label>
				<input type="text" value="<?=$or_no?>" disabled>
			</div>
			
			<div class="large-6 columns">
				<label>Amount</label>
				<?//if($edit_amount):?>
					<span id="amount_money_span">&#8369;</span><input id="amount_money" type="text" name="amount_paid"  value="<?php echo set_value('amount_paid',$amount);?>">
				<?//else:?>
					<!--<span id="amount_money_span">&#8369;</span><input id="amount_money"  value="<?php echo set_value('amount_paid',$amount);?>" disabled>-->
				<?//endif;?>
			</div>
		</div>
		
		<div class="row">
			<div class="large-6 columns">
				<label>Date Of Payment</label>
				<input type="text" name="date_of_payment" class ="datepicker-payment" value="<?php echo set_value('date_of_payment',$dop);?>">
			</div>
			<!--
			<div  class="large-6 columns">
				<label>For The Month of:</label>
				<?=form_dropdown('month_of',$months,set_value('month_of',$mof));?>
			</div>
			-->
		</div>
		
		<div class="row">
			<div class="large-6 columns">
				<label>Remarks</label>
				<textarea name="remarks"><?php echo set_value('remarks',$remarks);?></textarea>
			</div>
			
			<div  class="large-6 columns">
				<label>Payment Type</label>
				<?=form_dropdown('mde',array(''=>'Select Payment Mode...', 'Cash' => 'Cash', 'Cheque/Check' => 'Cheque/Check', 'Credit Card' => 'Credit Card'),set_value('month_of',$mde));?>
			</div>
			
		</div>
		<input type="hidden" name="payment_id" value="<?=$pid;?>">
		<input type="submit" class="button tiny"name="update_payment_record" value="Update Payment Record">
		</form>
	</div>
	</div>
</div>
